<html lang="zh-CN"><head>
<title>完成订单</title>
<meta charset="UTF-8">
<meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/alertMsg.js{$Think.config.RESOURCE_VER}"></script>
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/share_product.js{$Think.config.RESOURCE_VER}"></script>
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/product/product_order_success.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
<!--<link href="{$Think.config.RESOURCEURL}wx_assets/css/product_list.css" rel="stylesheet">-->
<!--<link href="{$Think.config.RESOURCEURL}wx_assets/css/product_templates.css" rel="stylesheet">-->
</head>
<body>
<notempty name="headerTpl">
	<include file="$headerTpl" />
</notempty>
    <div class="lay_page page_order_result">
        <div class="lay_page_wrap">
            <div class="mod_cell ui_mt15">
                <div class="ui_pt10"><strong class="ui_color_strong">下单成功</strong></div>
                <dl class="mod_dl dl_tabel">
                    <dt class="ui_color_weak ui_align_right">订单编号：</dt>
                    <dd class="">{$serialNumber}</dd>
                    <dt class="ui_color_weak ui_align_right">需付金额：</dt>
                    <dd class=""><span class="ui_color_strong">￥{$price}元</span></dd>
                </dl>
                <div class="mod_cell_hr"></div>
                <div class="qb_flex qb_mb10">
                    <a onclick="onOrderDetail(this)" class="mod_btn btn_block qb_mr10 flex_box">查看订单</a>
                    <a href="" class="mod_btn btn_block btn_em flex_box">再逛逛</a>
                </div>
            </div>
        </div>
    </div>
    
<notempty name="footerTpl">
	<include file="$footerTpl"/>
</notempty>
<script>
var hrefParamsArray = GetSessionIdFromHref(window.location.search);
hrefParamsArray["userName"]='{$userName}';
function GetSessionIdFromHref(search){
　　	var args = search.substring(1); 
　　	var retval = new Array(); 
	args = args.split("&"); 
		for(var i = 0; i < args.length; i ++){ 
			str = args[i]; 
			var arg = str.split("="); 
			if(arg.length <= 1) continue; 
			
			if(arg[0] == 'params') {
				var params = decodeURIComponent(arg[1]);
				var obj = eval('(' + params + ')');
				if (obj.rootid != undefined) {
					retval["rootid"] = obj.rootid;
				}
			} else if(arg[0] == 'customerId') {
				retval["customerId"] = arg[1]; 
			}else if(arg[0] == 'userName'){
				retval["userName"] = arg[1]; 
			}
		} 
		return retval; 
}

var basePath = 'call.html?customerId='+ hrefParamsArray["customerId"];
var rootId = hrefParamsArray["rootid"] == undefined ? '' : ',"rootid":' + hrefParamsArray["rootid"];
</script>
<script>
function onOrderDetail(ctrl) {
	ctrl.href = basePath + '&module=product&method=getOrderDetail&params={"tplid":1,"id":"1"' + rootId + '}';
}
</script>
</body></html>